<?php
  
class defaultComponents extends sfComponents
{
    public function executeLeftColumn(sfWebRequest $request)
    {                        
        if ($this->getUser()->hasCredential('admin'))
        {
            $this -> aBackendMenu = BackendMenuQuery::create()
                                                    ->orderByOrder()
                                                    ->find()
                                                    ->toArray();
        }
        else
        {
            $this -> aBackendMenu = BackendMenuQuery::create()
                                        ->filterByAdminFlag( false )
                                        ->orderByOrder()
                                        ->find()
                                        ->toArray();
        } 
    }
    
    public function executeTopMenu(sfWebRequest $request)
    {
        
    }
    
    public function executeAccountInfo(sfWebRequest $request)
    {
        $this->oAdmin = $this->getUser()->getAdmin();
    }
}